import request from '@/utils/request'

export function list(data) {
  return request({
    url:"baoXiu/list",
    method:'get',
    params:data
  })
}


export function add(data) {
  var form =new FormData();
  for(let i in data){
    form.append(i,data[i])
  }
  return request({
    url:"baoXiu",
    method:'post',
    data:form
  })
}

export function getById(id) {
  return request({
    url:"baoXiu/"+id,
    method:'get'
  })
}
export function getBaoXiuTypeList() {
  return request({
    url:"baoXiuType/list",
    method:'get'
  })
}


export function delById(id) {
  return request({
    url:"baoXiu/"+id,
    method:'delete'
  })
}

export function jieshou(id) {
  return request({
    url:"baoXiu/jieshou/"+id,
    method:'put'
  })
}

export function submit(data) {
  var form =new FormData();
  for(let i in data){
    form.append(i,data[i])
  }
  return request({
    url:"baoXiu/tijiao",
    method:'put',
    data:form
  })
}

export function right(data) {
  var form =new FormData();
  for(let i in data){
    form.append(i,data[i])
  }
  return request({
    url:"baoXiu/right",
    method:'put',
    data:form
  })
}

export function exportTable(data){
  return request({
    url:"baoXiu/export",
    method:'get',
    params:data
  })
}


